#include "BulletCollision/CollisionDispatch/btCollisionWorld.h"
#ifdef __cplusplus
extern "C" {
#endif
double bullet_btCollisionWorldRayResultCallback_GetFieldOfM_closestHitFraction(btCollisionWorld::RayResultCallback* c_this){
	return (double)(c_this->m_closestHitFraction);
}

int bullet_btCollisionWorldRayResultCallback_GetFieldOfM_collisionFilterGroup(btCollisionWorld::RayResultCallback* c_this){
	return (int)(c_this->m_collisionFilterGroup);
}

int bullet_btCollisionWorldRayResultCallback_GetFieldOfM_collisionFilterMask(btCollisionWorld::RayResultCallback* c_this){
	return (int)(c_this->m_collisionFilterMask);
}

btCollisionObject** bullet_btCollisionWorldRayResultCallback_GetFieldOfM_collisionObject(btCollisionWorld::RayResultCallback* c_this){
	return (btCollisionObject**)(&c_this->m_collisionObject);
}

unsigned int bullet_btCollisionWorldRayResultCallback_GetFieldOfM_flags(btCollisionWorld::RayResultCallback* c_this){
	return (unsigned int)(c_this->m_flags);
}

bool bullet_btCollisionWorldRayResultCallback_hasHit(btCollisionWorld::RayResultCallback* c_this){
	bool c_out = c_this->hasHit();
	bool wrap_out = (c_out);
	return wrap_out;
}

btCollisionWorld::LocalShapeInfo* bullet_NewbtCollisionWorldLocalShapeInfo(){
	btCollisionWorld::LocalShapeInfo* wrap_out = new btCollisionWorld::LocalShapeInfo();
	return wrap_out;
}

int bullet_btCollisionWorldLocalShapeInfo_GetFieldOfM_shapePart(btCollisionWorld::LocalShapeInfo* c_this){
	return (int)(c_this->m_shapePart);
}

int bullet_btCollisionWorldLocalShapeInfo_GetFieldOfM_triangleIndex(btCollisionWorld::LocalShapeInfo* c_this){
	return (int)(c_this->m_triangleIndex);
}

btCollisionWorld::LocalRayResult* bullet_NewbtCollisionWorldLocalRayResult(btCollisionObject* collisionObject,btCollisionWorld::LocalShapeInfo* localShapeInfo,btVector3* hitNormalLocal,double hitFraction){
	btCollisionObject const * c_arg_collisionObject=(btCollisionObject const *)(void*)(collisionObject);
	btCollisionWorld::LocalShapeInfo * c_arg_localShapeInfo=(btCollisionWorld::LocalShapeInfo *)(void*)(localShapeInfo);
	btVector3 const& c_arg_hitNormalLocal=(btVector3 const&)(*hitNormalLocal);
	btScalar c_arg_hitFraction=hitFraction;
	btCollisionWorld::LocalRayResult* wrap_out = new btCollisionWorld::LocalRayResult(c_arg_collisionObject,c_arg_localShapeInfo,c_arg_hitNormalLocal,c_arg_hitFraction);
	return wrap_out;
}

btCollisionObject** bullet_btCollisionWorldLocalRayResult_GetFieldOfM_collisionObject(btCollisionWorld::LocalRayResult* c_this){
	return (btCollisionObject**)(&c_this->m_collisionObject);
}

double bullet_btCollisionWorldLocalRayResult_GetFieldOfM_hitFraction(btCollisionWorld::LocalRayResult* c_this){
	return (double)(c_this->m_hitFraction);
}

btVector3* bullet_btCollisionWorldLocalRayResult_GetFieldOfM_hitNormalLocal(btCollisionWorld::LocalRayResult* c_this){
	return (btVector3*)(&c_this->m_hitNormalLocal);
}

btCollisionWorld::LocalShapeInfo** bullet_btCollisionWorldLocalRayResult_GetFieldOfM_localShapeInfo(btCollisionWorld::LocalRayResult* c_this){
	return (btCollisionWorld::LocalShapeInfo**)(&c_this->m_localShapeInfo);
}

btCollisionWorld::LocalConvexResult* bullet_NewbtCollisionWorldLocalConvexResult(btCollisionObject* hitCollisionObject,btCollisionWorld::LocalShapeInfo* localShapeInfo,btVector3* hitNormalLocal,btVector3* hitPointLocal,double hitFraction){
	btCollisionObject const * c_arg_hitCollisionObject=(btCollisionObject const *)(void*)(hitCollisionObject);
	btCollisionWorld::LocalShapeInfo * c_arg_localShapeInfo=(btCollisionWorld::LocalShapeInfo *)(void*)(localShapeInfo);
	btVector3 const& c_arg_hitNormalLocal=(btVector3 const&)(*hitNormalLocal);
	btVector3 const& c_arg_hitPointLocal=(btVector3 const&)(*hitPointLocal);
	btScalar c_arg_hitFraction=hitFraction;
	btCollisionWorld::LocalConvexResult* wrap_out = new btCollisionWorld::LocalConvexResult(c_arg_hitCollisionObject,c_arg_localShapeInfo,c_arg_hitNormalLocal,c_arg_hitPointLocal,c_arg_hitFraction);
	return wrap_out;
}

btCollisionObject** bullet_btCollisionWorldLocalConvexResult_GetFieldOfM_hitCollisionObject(btCollisionWorld::LocalConvexResult* c_this){
	return (btCollisionObject**)(&c_this->m_hitCollisionObject);
}

double bullet_btCollisionWorldLocalConvexResult_GetFieldOfM_hitFraction(btCollisionWorld::LocalConvexResult* c_this){
	return (double)(c_this->m_hitFraction);
}

btVector3* bullet_btCollisionWorldLocalConvexResult_GetFieldOfM_hitNormalLocal(btCollisionWorld::LocalConvexResult* c_this){
	return (btVector3*)(&c_this->m_hitNormalLocal);
}

btVector3* bullet_btCollisionWorldLocalConvexResult_GetFieldOfM_hitPointLocal(btCollisionWorld::LocalConvexResult* c_this){
	return (btVector3*)(&c_this->m_hitPointLocal);
}

btCollisionWorld::LocalShapeInfo** bullet_btCollisionWorldLocalConvexResult_GetFieldOfM_localShapeInfo(btCollisionWorld::LocalConvexResult* c_this){
	return (btCollisionWorld::LocalShapeInfo**)(&c_this->m_localShapeInfo);
}

double bullet_btCollisionWorldConvexResultCallback_GetFieldOfM_closestHitFraction(btCollisionWorld::ConvexResultCallback* c_this){
	return (double)(c_this->m_closestHitFraction);
}

int bullet_btCollisionWorldConvexResultCallback_GetFieldOfM_collisionFilterGroup(btCollisionWorld::ConvexResultCallback* c_this){
	return (int)(c_this->m_collisionFilterGroup);
}

int bullet_btCollisionWorldConvexResultCallback_GetFieldOfM_collisionFilterMask(btCollisionWorld::ConvexResultCallback* c_this){
	return (int)(c_this->m_collisionFilterMask);
}

bool bullet_btCollisionWorldConvexResultCallback_hasHit(btCollisionWorld::ConvexResultCallback* c_this){
	bool c_out = c_this->hasHit();
	bool wrap_out = (c_out);
	return wrap_out;
}

double bullet_btCollisionWorldContactResultCallback_GetFieldOfM_closestDistanceThreshold(btCollisionWorld::ContactResultCallback* c_this){
	return (double)(c_this->m_closestDistanceThreshold);
}

int bullet_btCollisionWorldContactResultCallback_GetFieldOfM_collisionFilterGroup(btCollisionWorld::ContactResultCallback* c_this){
	return (int)(c_this->m_collisionFilterGroup);
}

int bullet_btCollisionWorldContactResultCallback_GetFieldOfM_collisionFilterMask(btCollisionWorld::ContactResultCallback* c_this){
	return (int)(c_this->m_collisionFilterMask);
}

btCollisionWorld::ClosestRayResultCallback* bullet_NewbtCollisionWorldClosestRayResultCallback(btVector3* rayFromWorld,btVector3* rayToWorld){
	btVector3 const& c_arg_rayFromWorld=(btVector3 const&)(*rayFromWorld);
	btVector3 const& c_arg_rayToWorld=(btVector3 const&)(*rayToWorld);
	btCollisionWorld::ClosestRayResultCallback* wrap_out = new btCollisionWorld::ClosestRayResultCallback(c_arg_rayFromWorld,c_arg_rayToWorld);
	return wrap_out;
}

btVector3* bullet_btCollisionWorldClosestRayResultCallback_GetFieldOfM_hitNormalWorld(btCollisionWorld::ClosestRayResultCallback* c_this){
	return (btVector3*)(&c_this->m_hitNormalWorld);
}

btVector3* bullet_btCollisionWorldClosestRayResultCallback_GetFieldOfM_hitPointWorld(btCollisionWorld::ClosestRayResultCallback* c_this){
	return (btVector3*)(&c_this->m_hitPointWorld);
}

btVector3* bullet_btCollisionWorldClosestRayResultCallback_GetFieldOfM_rayFromWorld(btCollisionWorld::ClosestRayResultCallback* c_this){
	return (btVector3*)(&c_this->m_rayFromWorld);
}

btVector3* bullet_btCollisionWorldClosestRayResultCallback_GetFieldOfM_rayToWorld(btCollisionWorld::ClosestRayResultCallback* c_this){
	return (btVector3*)(&c_this->m_rayToWorld);
}

btCollisionWorld::ClosestConvexResultCallback* bullet_NewbtCollisionWorldClosestConvexResultCallback(btVector3* convexFromWorld,btVector3* convexToWorld){
	btVector3 const& c_arg_convexFromWorld=(btVector3 const&)(*convexFromWorld);
	btVector3 const& c_arg_convexToWorld=(btVector3 const&)(*convexToWorld);
	btCollisionWorld::ClosestConvexResultCallback* wrap_out = new btCollisionWorld::ClosestConvexResultCallback(c_arg_convexFromWorld,c_arg_convexToWorld);
	return wrap_out;
}

btVector3* bullet_btCollisionWorldClosestConvexResultCallback_GetFieldOfM_convexFromWorld(btCollisionWorld::ClosestConvexResultCallback* c_this){
	return (btVector3*)(&c_this->m_convexFromWorld);
}

btVector3* bullet_btCollisionWorldClosestConvexResultCallback_GetFieldOfM_convexToWorld(btCollisionWorld::ClosestConvexResultCallback* c_this){
	return (btVector3*)(&c_this->m_convexToWorld);
}

btCollisionObject** bullet_btCollisionWorldClosestConvexResultCallback_GetFieldOfM_hitCollisionObject(btCollisionWorld::ClosestConvexResultCallback* c_this){
	return (btCollisionObject**)(&c_this->m_hitCollisionObject);
}

btVector3* bullet_btCollisionWorldClosestConvexResultCallback_GetFieldOfM_hitNormalWorld(btCollisionWorld::ClosestConvexResultCallback* c_this){
	return (btVector3*)(&c_this->m_hitNormalWorld);
}

btVector3* bullet_btCollisionWorldClosestConvexResultCallback_GetFieldOfM_hitPointWorld(btCollisionWorld::ClosestConvexResultCallback* c_this){
	return (btVector3*)(&c_this->m_hitPointWorld);
}

btCollisionWorld::AllHitsRayResultCallback* bullet_NewbtCollisionWorldAllHitsRayResultCallback(btVector3* rayFromWorld,btVector3* rayToWorld){
	btVector3 const& c_arg_rayFromWorld=(btVector3 const&)(*rayFromWorld);
	btVector3 const& c_arg_rayToWorld=(btVector3 const&)(*rayToWorld);
	btCollisionWorld::AllHitsRayResultCallback* wrap_out = new btCollisionWorld::AllHitsRayResultCallback(c_arg_rayFromWorld,c_arg_rayToWorld);
	return wrap_out;
}

btVector3* bullet_btCollisionWorldAllHitsRayResultCallback_GetFieldOfM_rayFromWorld(btCollisionWorld::AllHitsRayResultCallback* c_this){
	return (btVector3*)(&c_this->m_rayFromWorld);
}

btVector3* bullet_btCollisionWorldAllHitsRayResultCallback_GetFieldOfM_rayToWorld(btCollisionWorld::AllHitsRayResultCallback* c_this){
	return (btVector3*)(&c_this->m_rayToWorld);
}

btCollisionWorld* bullet_NewbtCollisionWorld(btDispatcher* dispatcher,btBroadphaseInterface* broadphasePairCache,btCollisionConfiguration* collisionConfiguration){
	btDispatcher * c_arg_dispatcher=(btDispatcher *)(void*)(dispatcher);
	btBroadphaseInterface * c_arg_broadphasePairCache=(btBroadphaseInterface *)(void*)(broadphasePairCache);
	btCollisionConfiguration * c_arg_collisionConfiguration=(btCollisionConfiguration *)(void*)(collisionConfiguration);
	btCollisionWorld* wrap_out = new btCollisionWorld(c_arg_dispatcher,c_arg_broadphasePairCache,c_arg_collisionConfiguration);
	return wrap_out;
}

void bullet_btCollisionWorld_contactPairTest(btCollisionWorld* c_this,btCollisionObject* colObjA,btCollisionObject* colObjB,btCollisionWorld::ContactResultCallback* resultCallback){
	btCollisionObject * c_arg_colObjA=(btCollisionObject *)(void*)(colObjA);
	btCollisionObject * c_arg_colObjB=(btCollisionObject *)(void*)(colObjB);
	btCollisionWorld::ContactResultCallback& c_arg_resultCallback=(btCollisionWorld::ContactResultCallback&)(*resultCallback);
	c_this->contactPairTest(c_arg_colObjA,c_arg_colObjB,c_arg_resultCallback);
}

void bullet_btCollisionWorld_contactTest(btCollisionWorld* c_this,btCollisionObject* colObj,btCollisionWorld::ContactResultCallback* resultCallback){
	btCollisionObject * c_arg_colObj=(btCollisionObject *)(void*)(colObj);
	btCollisionWorld::ContactResultCallback& c_arg_resultCallback=(btCollisionWorld::ContactResultCallback&)(*resultCallback);
	c_this->contactTest(c_arg_colObj,c_arg_resultCallback);
}

void bullet_btCollisionWorld_convexSweepTest(btCollisionWorld* c_this,btConvexShape* castShape,btTransform* from,btTransform* to,btCollisionWorld::ConvexResultCallback* resultCallback,double allowedCcdPenetration){
	btConvexShape const * c_arg_castShape=(btConvexShape const *)(void*)(castShape);
	btTransform const& c_arg_from=(btTransform const&)(*from);
	btTransform const& c_arg_to=(btTransform const&)(*to);
	btCollisionWorld::ConvexResultCallback& c_arg_resultCallback=(btCollisionWorld::ConvexResultCallback&)(*resultCallback);
	btScalar c_arg_allowedCcdPenetration=allowedCcdPenetration;
	c_this->convexSweepTest(c_arg_castShape,c_arg_from,c_arg_to,c_arg_resultCallback,c_arg_allowedCcdPenetration);
}

btDispatcherInfo* bullet_btCollisionWorld_getDispatchInfo(btCollisionWorld* c_this){
	btDispatcherInfo& c_out = c_this->getDispatchInfo();
	btDispatcherInfo* wrap_out = (btDispatcherInfo*)(&c_out);
	return wrap_out;
}

btDispatcherInfo* bullet_btCollisionWorld_getDispatchInfo1(btCollisionWorld* c_this){
	btDispatcherInfo const& c_out = c_this->getDispatchInfo();
	btDispatcherInfo* wrap_out = (btDispatcherInfo*)(&c_out);
	return wrap_out;
}

bool bullet_btCollisionWorld_getForceUpdateAllAabbs(btCollisionWorld* c_this){
	bool c_out = c_this->getForceUpdateAllAabbs();
	bool wrap_out = (c_out);
	return wrap_out;
}

int bullet_btCollisionWorld_getNumCollisionObjects(btCollisionWorld* c_this){
	int c_out = c_this->getNumCollisionObjects();
	int wrap_out = (c_out);
	return wrap_out;
}

void bullet_btCollisionWorld_objectQuerySingle(btCollisionWorld* c_this,btConvexShape* castShape,btTransform* rayFromTrans,btTransform* rayToTrans,btCollisionObject* collisionObject,btCollisionShape* collisionShape,btTransform* colObjWorldTransform,btCollisionWorld::ConvexResultCallback* resultCallback,double allowedPenetration){
	btConvexShape const * c_arg_castShape=(btConvexShape const *)(void*)(castShape);
	btTransform const& c_arg_rayFromTrans=(btTransform const&)(*rayFromTrans);
	btTransform const& c_arg_rayToTrans=(btTransform const&)(*rayToTrans);
	btCollisionObject * c_arg_collisionObject=(btCollisionObject *)(void*)(collisionObject);
	btCollisionShape const * c_arg_collisionShape=(btCollisionShape const *)(void*)(collisionShape);
	btTransform const& c_arg_colObjWorldTransform=(btTransform const&)(*colObjWorldTransform);
	btCollisionWorld::ConvexResultCallback& c_arg_resultCallback=(btCollisionWorld::ConvexResultCallback&)(*resultCallback);
	btScalar c_arg_allowedPenetration=allowedPenetration;
	c_this->objectQuerySingle(c_arg_castShape,c_arg_rayFromTrans,c_arg_rayToTrans,c_arg_collisionObject,c_arg_collisionShape,c_arg_colObjWorldTransform,c_arg_resultCallback,c_arg_allowedPenetration);
}

void bullet_btCollisionWorld_objectQuerySingleInternal(btCollisionWorld* c_this,btConvexShape* castShape,btTransform* convexFromTrans,btTransform* convexToTrans,btCollisionObjectWrapper* colObjWrap,btCollisionWorld::ConvexResultCallback* resultCallback,double allowedPenetration){
	btConvexShape const * c_arg_castShape=(btConvexShape const *)(void*)(castShape);
	btTransform const& c_arg_convexFromTrans=(btTransform const&)(*convexFromTrans);
	btTransform const& c_arg_convexToTrans=(btTransform const&)(*convexToTrans);
	btCollisionObjectWrapper const * c_arg_colObjWrap=(btCollisionObjectWrapper const *)(void*)(colObjWrap);
	btCollisionWorld::ConvexResultCallback& c_arg_resultCallback=(btCollisionWorld::ConvexResultCallback&)(*resultCallback);
	btScalar c_arg_allowedPenetration=allowedPenetration;
	c_this->objectQuerySingleInternal(c_arg_castShape,c_arg_convexFromTrans,c_arg_convexToTrans,c_arg_colObjWrap,c_arg_resultCallback,c_arg_allowedPenetration);
}

void bullet_btCollisionWorld_rayTestSingle(btCollisionWorld* c_this,btTransform* rayFromTrans,btTransform* rayToTrans,btCollisionObject* collisionObject,btCollisionShape* collisionShape,btTransform* colObjWorldTransform,btCollisionWorld::RayResultCallback* resultCallback){
	btTransform const& c_arg_rayFromTrans=(btTransform const&)(*rayFromTrans);
	btTransform const& c_arg_rayToTrans=(btTransform const&)(*rayToTrans);
	btCollisionObject * c_arg_collisionObject=(btCollisionObject *)(void*)(collisionObject);
	btCollisionShape const * c_arg_collisionShape=(btCollisionShape const *)(void*)(collisionShape);
	btTransform const& c_arg_colObjWorldTransform=(btTransform const&)(*colObjWorldTransform);
	btCollisionWorld::RayResultCallback& c_arg_resultCallback=(btCollisionWorld::RayResultCallback&)(*resultCallback);
	c_this->rayTestSingle(c_arg_rayFromTrans,c_arg_rayToTrans,c_arg_collisionObject,c_arg_collisionShape,c_arg_colObjWorldTransform,c_arg_resultCallback);
}

void bullet_btCollisionWorld_rayTestSingleInternal(btCollisionWorld* c_this,btTransform* rayFromTrans,btTransform* rayToTrans,btCollisionObjectWrapper* collisionObjectWrap,btCollisionWorld::RayResultCallback* resultCallback){
	btTransform const& c_arg_rayFromTrans=(btTransform const&)(*rayFromTrans);
	btTransform const& c_arg_rayToTrans=(btTransform const&)(*rayToTrans);
	btCollisionObjectWrapper const * c_arg_collisionObjectWrap=(btCollisionObjectWrapper const *)(void*)(collisionObjectWrap);
	btCollisionWorld::RayResultCallback& c_arg_resultCallback=(btCollisionWorld::RayResultCallback&)(*resultCallback);
	c_this->rayTestSingleInternal(c_arg_rayFromTrans,c_arg_rayToTrans,c_arg_collisionObjectWrap,c_arg_resultCallback);
}

void bullet_btCollisionWorld_setBroadphase(btCollisionWorld* c_this,btBroadphaseInterface* pairCache){
	btBroadphaseInterface * c_arg_pairCache=(btBroadphaseInterface *)(void*)(pairCache);
	c_this->setBroadphase(c_arg_pairCache);
}

void bullet_btCollisionWorld_setForceUpdateAllAabbs(btCollisionWorld* c_this,bool forceUpdateAllAabbs){
	bool c_arg_forceUpdateAllAabbs=forceUpdateAllAabbs;
	c_this->setForceUpdateAllAabbs(c_arg_forceUpdateAllAabbs);
}

void bullet_btCollisionWorld_updateSingleAabb(btCollisionWorld* c_this,btCollisionObject* colObj){
	btCollisionObject * c_arg_colObj=(btCollisionObject *)(void*)(colObj);
	c_this->updateSingleAabb(c_arg_colObj);
}

#ifdef __cplusplus
}
#endif
